<html>
<head>
	<title>Excersise 2</title>
	<link href="styles/js-console.css" rel="stylesheet" />
</head>
<body>
	<div id="js-console"></div>
	<script src="scripts/js-console.js"></script>
	<script>
	
		Array.prototype.remove = function (element) 
		{
    		var array = [];
    		for(var i = 0; i < this.length; i++) 
			{
        		if (this[i] != element) 
				{ 
            		array.push(this[i]);
        		}
    		}
    		return array;
		}

		var arr = [1,2,3,4,5,6,7,"3",8,3,9,"6",7];
		jsConsole.writeLine("The given array is: "+arr);
		jsConsole.writeLine("\n");

		var arrResult = arr.remove(3);
		jsConsole.write("The result after removing elements) is: ")

		for (var i = 0; i < arrResult.length; i++) 
		{
			jsConsole.write(arrResult[i] + ",")
		};
		
	</script>
</body>
</html>
